package com.jiantong.user.impl.dao;

import com.jiantong.user.model.Area;
import io.terminus.common.mysql.dao.MyBatisDao;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * Created by mz on 31/5/17.
 *
 */
@Repository
public class AreaDao extends MyBatisDao<Area>{

    public List<Area> queryList(Map<String , Object> map){

        return getSqlSession().selectList(sqlId("queryList"),map);
    }

    public Map selectids(Map criteria){
        return getSqlSession().selectOne(sqlId("selectids"),criteria);
    }

    public List<Area> selectsubordinate(Map criteria){
        return getSqlSession().selectList(sqlId("selectsubordinate"),criteria);
    }

    public Area selectByAreaCode(Map criteria){
        return getSqlSession().selectOne(sqlId("selectByAreaCode"),criteria);
    }

    public Map selectLastCode(Map criteria){
        return getSqlSession().selectOne(sqlId("selectLastCode"),criteria);
    }

}
